package main.a_SimpleFactoryModel;

/**
 * Created by newtranx_011 on 2017/9/13.
 */
public class Main {

    public static void main(String[] args) {
        String strA = "12";
        String strB = "5";
        double numA = Double.parseDouble(strA);
        double numB = Double.parseDouble(strB);
        Operation operation =  OperationFactory.createOperation("/");
         operation.setNumA(numA);
         operation.setNumB(numB);
        double result = 0d;
        try {
            result = operation.getResult();
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
        System.out.println(result);
    }
}
